<!DOCTYPE html>
<!--
  ~ Copyright (C) 2018 guomw.Inc. All rights reserved.
  ~ 项目名称： mysite
  ~ 文件名称： list.html
  ~ Date：18-10-15 下午3:33
  ~ Author: guomw
  -->

<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="/common/head::head('文件列表test')">
<body class="gray-bg">

<div class="wrapper wrapper-content  animated fadeInRight">
    <input id="fileupload" type="file" multiple="true" name="file" data-url="/user/doFile">
    <progress id="progress" value="0" max="100"></progress>





</div>

<footer th:include="/common/footer::js"/>
<script>


</script>

<script src="/resource/js/jquery.ui.widget.js"></script>
<script src="/resource/js/jquery.fileupload.js"></script>
<script>
    $(function () {
        p = $("#progress");

        $('#fileupload').fileupload({
            dataType: 'json',

            progressall: function (e, data) {
                var progress = parseInt(data.loaded / data.total * 100, 10);
                p.val(progress);
            },

            done: function (e, data) {
                alert("上传成功");
            }
        });
    });
</script>

</body>
</html>
